Add ephemeral EC2 Harbor backend - #1131
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Oddish previewCommit:
Vercel deployment URL: https://oddish-a1v469xab.oddish.app Plan:
This comment is updated by the PR Preview workflow. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 07d2b17. Configure here.
This was referenced Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What changed
environment=ec2execution with one public-IP, key-only SSH EC2 instance per Harbor trial.0600temporary files for the owning operation, then removes them.ec2://<account>/<region>/<instance>handle immediately after launch and requires both protected tags and the sandbox ledger for teardown.a7caa586de620f8a7103018f99ce9e1603f90eb4, including lifecycle identity and structured environment-subphase timing.No ECS cluster, Auto Scaling group, or AWS infrastructure provisioning is introduced. Three Oddish migrations add execution-lane routing, sandbox ownership/lifecycle records, and EC2 capacity leases.
Companion Harbor PR: abundant-ai/harbor#23.
Safety and cleanup
Validation
git diff --checkpassed on the final patch.AWS canary evidence
Task:
13-P1-distractor-volume-shell-6f90339cNOP and oracle baseline — experiment
ce649b18Both trials used the pinned Harbor SHA and completed with no inner Harbor exception. All 18 setup and teardown subphases succeeded.
-50i-0f752ca646663deeevol-01d9fb4954e326ace-61i-07dc064d7719f2e1fvol-021f24306f044e71fThe NOP used the shortened
verifier_finalized_without_declarationpath; its long verifier duration is the task's evidence floor, not the one-hour fallback.3× Fireworks GLM-5p2 — experiment
3ac1d042All three trials launched an EC2 instance, reached the native k3s/Helm task environment, ran the verifier, uploaded artifacts, completed all 18 lifecycle subphases successfully, and terminated the instance. Exact-ID AWS inspection then proved every root volume deleted and
active_managed_volumes=[].-18i-07e69138db4d7a6e7vol-0182a33094e6387da-19AgentTimeoutErrori-0cf9537c6b404a034vol-0f3c23d657fc60f56-20AgentTimeoutErrori-0ed66e4e20ab4519avol-0826816fcab4dcf6aOddish currently reports these three rows as
SUCCESSbecause the verifier completed, while Harbor's inner results preserve the agent exceptions. The EC2 backend E2E and destructive cleanup paths are proven; these runs do not establish Fireworks model reliability or task-solving success.Performance
The measured cold path is dominated by two waits:
The prebuilt 33 GB workload-image AMI was not retained because lazy EBS snapshot initialization made it slower. Daytona remains the hosted CPU default. Follow-up optimization should focus on task chart readiness and a small tools-only AMI rather than baking the workload image store without Fast Snapshot Restore or explicit volume initialization.
EC2 remains opt-in after merge.
Note
High Risk
Large cross-cutting change touching AWS credentials, remote instance lifecycle, queue dispatch, and DB migrations; misconfiguration or reconciliation bugs could leak instances or exceed capacity, though guarded by ledgers, tags, and least-privilege secret scoping.
Overview
Introduces an opt-in CPU-only Harbor backend (
--env ec2) that runs one ephemeral public-IP EC2 instance per trial while Daytona stays the hosted CPU default. Callers must explicitly select EC2; the API rejects it when the deployment has not enabled and configuredODDISH_EC2_*.Platform wiring: Modal/staging deploys gain non-secret EC2 launch coordinates plus separate Modal secrets for AWS control vs SSH; API/dispatcher never receive those credentials. A dedicated
ec2_trialexecution lane,process_single_ec2_trial_job, and reconciler-only control access route jobs; API cancel delegates toteardown_ec2_sandbox. Harbor is pinned to a revision with EC2 lifecycle support; worker images addopenssh-clientand boto3.Data model & scheduling: Three migrations add
worker_jobs.execution_lane,sandbox_runsownership ledger, andsandbox_capacity_leases. Dispatch units become(queue_key, harbor_variant_id, execution_lane)with EC2 global cap budgeting; Docker/K8s/in-process dispatchers propagate lane viaspawn_units. The newEc2Backendmaterializes credentials, merges protected launch tags, and tears down only after ledger + tag verification; orphan reconciliation uses a conservative grace window and hard max age.Product surface: CLI/docs/env examples, cloud policy gating, frontend EC2 badges and rerun commands, and tests for secret topology, teardown delegate, and capacity lease behavior on cancel.
Reviewed by Cursor Bugbot for commit 238c454. Bugbot is set up for automated code reviews on this repo. Configure here.